Print error instead of HTTP request
Fix nil pointer dereference