fixed auto tostring in pretty serialization; fixed files not being 'reset' when opening unbuffered files in write mode