Properly handle errors and enable http logging
Make the build Android compatible