fixed WriteFile added file.Name to path