save object to disk