Moved log to separate file. Added more logging.