private long waitForBackupSizeToBecomeStable(Date timeoutDate, String backupName) throws ReadTimeoutException {
        com.unispezi.cpanelremotebackup.tools.Console.print("Polling for backup file size to become stable");
        long lastFileSize = 0;
        long currentFileSize = 0;
        Date now = new Date();
        while (((currentFileSize < minFileBytes) || (currentFileSize != lastFileSize)) && (now.before(timeoutDate))) {
            com.unispezi.cpanelremotebackup.tools.Console.print(".");
            FTPFile backupWeStarted = ftp.getFileDetails(backupName);
            lastFileSize = currentFileSize;
            currentFileSize = backupWeStarted.getSize();
            try {
                Thread.sleep(pollIntervalSeconds * 1000);
            } catch (InterruptedException e) {
                //Do nothing
            }
            now = new Date();
        }
        com.unispezi.cpanelremotebackup.tools.Console.println(" " + currentFileSize + " bytes");

        if (now.after(timeoutDate)){
            throw new ReadTimeoutException("Download of file exceeded timeout");
        }
        return currentFileSize;
    }