Modified directory_agent_main to log errors better.
More logging of errors.