Upload two call file into outgoing directory, second call doesn't work

My program upload a call file in outgoing directory and immediately upload second file. Only first call works. Why ?
I use this format in my call files for channel.
Channel: SIP/[phone number]@[IP address]

Asterisk log for second call have this line:
Got SIP response 500 “Internal Server Error” back from [IP address]

asterisk version is

You will need to contact the people responsible for maintaining the system at [IP address] as they are rejecting the call.

Callfiles are really read in a kind of aggressive way by Asterisk so perhaps the second callfile is read and processed by Asterisk before the download is completed and for that reason Asterisk fails to set up a call in a proper way. The best way is to download the files to another directory and then move the call files to the outgoing directory.

I upload files into outgoing by .writing extension, and then, after upload completion, change the extension to .call.

You should provide CLI output for those callfile calls.
BTW, Better create a call file under some other directory i.e. /tmp and then move it to /var/spool/asterisk/outgoing/

–Satish Barot