getBaseFile throws a RuntimeException because a stream is closed. 52N just commented out the deleteQuietly, this will at least still delete when no exception is thrown.