better handling of $SIG{__WARN__}