Adapted for sftp realtime needs.