Fix 'open' to a 'with open as'