properly implemented log block. problems with shutdown