fix warning while saving pickled data, and better handle of failure on
update