Fixed compatibilities with having Jetpack installed. Added timeout using stream context. More error checks