Added exception for invalid text (most of the time invalid encoding)