$SIG{__DIE__}=sub {print LOG "Script Died: $_[0]" and close LOG if DEBUGING};