Added debug flag for msgs