     ///
     /// - Parameters:
     ///     - archiveToFile:    FileURL or path (as String) to where the existing log file should be rotated to.
+    ///     - closure:          An optional closure to execute after the file has been rotated.
     ///
     /// - Returns:
     ///     - true:     Log file rotated successfully.
     ///     - false:    Error rotating the log file.
     ///
-    @discardableResult open func rotateFile(to archiveToFile: Any) -> Bool {
+    @discardableResult open func rotateFile(to archiveToFile: Any, closure: ((_ success: Bool) -> Void)? = nil) -> Bool {
         var archiveToFileURL: URL? = nil
 
         if archiveToFile is NSString {

            archiveToFileURL = archiveToFile
        }
        else {
            return false
        }


          let writeToFileURL = writeToFileURL {

            let fileManager: FileManager = FileManager.default
            guard !fileManager.fileExists(atPath: archiveToFileURL.path) else { closure?(false); return false }

            closeFile()
            haveLoggedAppDetails = false
