Updated get_weather() to use curl to fetch data and log errors