handles error_log problem in agent
minor fixes in the agent