Main, txt handler and test txt handler updated