Cleanly exit when we read from an opened file
Add some documentation for the python bindings