Python Error and FileIO conveniences