Gracefully exitting the execution