Added debug to app.__init__ in order to get logs and fixed bug testing localhost decorator