logging in app method, debug wrong condition