Better Error handling
changed weigth sampling for parEGO