base64 encoding .txt file

ardonis:
i am using standard SD library, but it works, ir can open two files at one time, but problem isn't there,

Given that your solution doesn't work, I think you're too quick to dismiss that as a problem. The standard SD library only supports access to one file at a time. Of course, since you don't check for success, you will have no idea which file you actually have open. Since the symptoms of clashing file handles could leave you with buffers incompletely read or written, it could easily produce the type of confusing behaviour that you're describing.