Converted from SystemWrapper to System.IO.Abstractions