Improved handling of File Exceptions and fixed colored text regexpr