fixed return code of is_file