added error control

Added error control to operations.