fix crash on close

options->file_cache is not a pointer and therefore if this is executed the program will crash