Improved write_url_to_ini_file error cases