commit and sync before submit