Be more robust and verbose in trigger.cpp