Use 'with' instead of old-style file opening