Minor changes to the variable (in/out) order of subroutine check_file_exist.