Improved handler logging