I fixed closing non-existent files