Fixed: do not activate silence handler if APM is not enabled
Changed: removed unused var
Changed: removed some compiler warnings