added http tracking and safe shutdown