Fix script error message format for tests