Improved handling of output string in verification