Fix run.sh for cases where output ends without LF