bug fix for string.format
compatible error message for *.lines
added test script