fixed: bug on testAgent function. Log file could not be saved on success.