Merge code

1. Delete last Jobs record when jobs record count > 0
2. Append log when sql bulk log count > 0