Added option to rollback rather than commit transaction