Small change

put addtxt() before the commands. That way, it is the first to run.