Added some debugging outputs, corrected a wrong watermark setting
Small adoptions