add debug info to facilitate troubleshooting of errors