moved debug flag to config