added standard startup and shutdown procedures, fatal error helper