Error 201 means "Range check error". If you compiled your program with range checking on, then you can get this error in the following cases:
- An array was accessed with an index outside its declared range.
- Trying to assign a value to a variable outside its range (for instance an enumerated type).
Output and cutDownText are declared as string. If you don't compile the program with the {$H+} option, string is limited to 255 characters, but you could trying to copy more than 255 chars from the input ansistring.
Try to compile with {$H+} or convert string to ansistring everywhere.