output error infos to log file