Fixing segfault error when attempting to fclose() nonexistent files.