Added handy debug flag. Fixed printf parens