added success/failure reporting at the end