Echo cannot redirect first or second output to logfile

I created a script to do some work. I want to use "echo" to redirect "date" to log file. echo works to screen. But cannot redirect first or second "echo" output to logfile. Please help. My code looks like:

STARTTIME=`date +%m-%d-%Y`
LOGFILE=/directory/logfile.log
echo "Start time:" $STARTTIME
echo "--------------------" > $LOGFILE
echo "Stert time:" $STARTTIME >> $LOGFILE
echo "Delete file" 
echo "Delete file" >> $LOGFILE
....
....
ENDTIME=`date +%m-%d-%Y`
echo "End time:" $ENDTIME
echo "End time:" $ENDTIME >> $LOGFILE

the script runs ok. but starttime and delete file output cannot be directed to logfile. All other echo output can be output on screen and be redirected to logfile. I cannot figure out why this happen. I searched online and cannot find good answer. Please adsvise and thanks a lot.

What's the ownership and permissions on logfile.log ?

I log in as Oracle super user. The file permission is -rw-r--r--

And who owns it?

The Oracle super user that I log in with

Did you copy-paste the script, or rewrite a little mockup for here? Nothing appears wrong, but if you didn't copy-paste the actual script, there could easily be little things lost in translation. Any problem with the LOGFILE= assignment for example would stop it from working.

Yes, the original script was created on my laptop. The upload to a web file repository. Then I log into another Virtual machine. Download script to this virtual machine. Then I used WinSCP copy the script to Solaris Server. After that, I used vi to edit the file and added log file and echo code to redirect output to logfile. Does this affect script work? Any other suggestion? Thanks.

"set -x" on the top of the script, just after the #!/bin/ksh or whatever shell you use. Thne check on the output's run where is the error.

resolve the issue. The problem is the order of coding. I put rm $LOGFILE in front of echo $STARTTIME. Of course, the file has been rrmoved, then create again with other echo redirect info. This is why I cannot see first and second echo line. Thanks for input.