Added option to disable debug msgs