Correct checking for existing file