saving before sync