handles error_log problem in agent