Use the msg function to report errors wherever possible.