all threads using files now close when application close.