improve logging
improve http and move io mock