fixed #83 , addded option to disable debug messages