move a registration of commit_cb before calling output_commit