Added debugmode.