added crash logging