Commit after completion of function