Some changes to FileThread