Catch RuntimeException and reset files!