write & read object to/from local file