[pm-qa 1/5] fix error output to the log file