added debug mode, removed unused read function
added more debug mode print statements
color checkbox is saved