fixed bugs when password file was silently truncated