Close log file when app quits.