added state machine to agent_import_file