fixed logging - take 2