Script exits when using UNIX2dos / dos2UNIX

I'm not sure why but my script quits automatically at the point where unix2dos / dos2unix command is used. :confused::confused::confused:

How do a fix it?

LOG_FILE=MADDY.txt

unix2dos ${LOG_FILE}

exec 2> $LOG_FILE 1>&2

echo ${LOG_FILE}

The script exists after the below message

unix2dos: converting file MADDY.txt to DOS format ...

With above commands in the script, the only result should be file MADDY.txt holding the string "MADDY.txt", no <CR> added.

Adding to what RudiC said: Why are you modifying MADDY.txt, when you throw away the modifications afterwards anyway (with your echo statement)?

It is unclear what you are trying to accomplish.
Please explain what you are trying to do.