I have a function like the following and I want to call it with the code you see after a few seconds but the program stops as soon as that code is executed. I also used try{}cat