Remove exec at the end and replace with exit.