better check of the fopen call on remote xapi url