Preview large TXT files fix

Limit the size of the string generating the preview image for TXT files