added debug to flask