callback improvements and logging