Refactored and added safety checks: Color, Reader, Main.
Changed to ParseException in Reader. Changed Writer to throw IOException. Caught in main.