Log only when Debug enabled and fix wifi