Change WriteSql() to WrapSql()