fixed segfault when logging to closed debug file