code cleanup
improved error logging
increased http timeout to 10s