Using a context manager to open a file