Use 'with' statement for opening file