Made better use of the file wrappers, simplified code, used the API to convert filepaths instead of string concats