check that the file exists after creating it