This seems like inappropriate copy/paste.  Just 'check_file_status(filename)', no?