Fix reusing the same temporary file name to store the credentials