Use `with open` here, it's the preferred way to manage files.