Updated data.go to rollback the transaction when and error occurs. Transaction was not being rolled back before.