Adding a return statement to the graceful_exit