improve setName a bit and move some logic to FS.Utility