close_log function

Close any active log file