Unable to get Stata working on OOD

I noticed that the job was finishing instantly and then I read OSC documentation on certain apps such as Stata background themselves. I add the suggested code and the job is no longer finishing instantly. It all works. Here is the URL i followed to solve it: Troubleshooting Interactive Apps — Open OnDemand 1.8.12 documentation