more informative error messages, adding a debug/verbose flag.