end of day commit, with error handling.