Add txt support and lib (need more test)