GetCCDMask explained
fix debug setting
Fix Write cmd to detect Set vs Get