move commit right after insertdatatier and rollback in finally. YG