some improvements to tbfile