Added read timeout of 5 seconds to prevent blocking