Close log handler before removing it
Close log files after reading them