Fix some typo in log and error handling for log
file open failure.