Added more extensive debugging output
Added proper value toggling for boolean options.