I would rather inverse the order of this code - I would handle special situation (file does not exist) in "if" and normal situation (because it is usually more complex than special situation).