check for debug flag