better routing exception handling and logging