Merged some "if (f != -1)" checks, put the clean_flist() call in the