added features for rollback on inserts to handle errors and partial loads