[sys] log stack traces when required only