Refactor read and extract conditional to exceptions on class