catching file exists more explicitly