clean exit on completeiotn