Cleaning up when not allowed to open files.