Added debugging in the config parser and fixed a bug in the debug code

Signed-off-by: Toon Schoenmakers <nighteyes1993@gmail.com>