Fix buffer bug; improve log; add string test, buffer test, datetime test