Add error checking, and only push if there are changes.