better fail safe logging