Fix error handling of reading password hash file

Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>