Added rollback checking

missing error and rollback checking