Added log to file and clear log file