establishing connection with e-kermit running on LINUX from my operating system

we designed a primitive operating system for learning basics fundamentals and we created process switching, interrupt/polled IO for device drivers like UART and printers. We accomplish this by using our own tools called SPEDE (for downloading compiled elf image from host ubuntu system that have SPEDE specific old c compiler to the target system RAM using UART com1 port). One of my project work is to extend this to write device drivers for IDE and integrate file system say FAT16 and download files from host to target using another UART cable-connection.
url is

I am in the last part of downloading and used simple e-kermit to download files from host to target, but i am facing problems like data loss in transmission. I have taken out all the extra code and have the code just for downloading files from host to target in
the url is
github.com/bicepjai/nanos/tree/master/download_file_uart

The code have some printf statements, but they are omitted since it takes more time to execute. I have disabled the interrupt driven system and using polled IO for preventing any kind of loss. still i have data loss in transmission and have been trying to get over it for more than a month.

Any suggestions will be much appreciated.