more logging and fine-tuning