more logging, more cleanup