             print(error.localizedDescription);
         }
         
+        self.logDirectory = URL(string: finalDirectory)!
         let fileDateString = RSFileLogger.string(for: Date())
         let finalLogFilePath = finalDirectory.appending("/\(fileDateString).log")
         self.logFile = URL(fileURLWithPath: finalLogFilePath)

    }
    
    static func string(for date: Date) -> String {
        if #available(iOS 10.0, *) {
            return ISO8601DateFormatter().string(from: date)
        } else {
            let dateFormatter = DateFormatter()
            let enUSPOSIXLocale = Locale(identifier: "en_US_POSIX")
            dateFormatter.locale = enUSPOSIXLocale as Locale
            dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ssZZZZZ"
            return dateFormatter.string(from: date)
        }
    }
    
    

public class RSFileLogger: NSObject, RSLogger {

    let logQueue: DispatchQueue
    public let logDirectory: URL
    public let logFile: URL
    
    public init?(directory: String) {
        
