add fmt parameter in putlines function(now support usr and ussrt format, see.fileds).