Syntax fix & improved debug output