add global control
add try catch for insert issue