you should also check that the auto-trace line is defined before inserting it in the user's code.