now app terminates with ctrl+c and stops flask and pdextended