Removed indirect filehandlers to make the agent compatible for perl version < 5.6.0