         res = JSON.parse(res.getBody('utf8'))
     catch e
         log.e "Error while performing process request: #{e.toString()}"
+        return no
 
     if res?
         currentTasks.push(res._id)
         perform(res)
         yes
-    else
-        no
 
 
 setInterval(->

available_threads = os.cpus().length

METERS = ['wins', 'completion']
URL = "http://mspacman.ml/methods/"

# Bom's: n_rounds_powerpill=55 initial_scatter_cycle_rounds=40 initial_chase_cycle_rounds=10


    catch e
        log.e "Error while performing redo request for #{taskid}: #{e.toString()}"

done = (task, result) ->
    console.log task
    currentTasks.splice(currentTasks.indexOf(task._id), 1)
    try
        res = request('POST', URL + 'finishTask', { json: { _id: task._id, result, index: task.data.index, experimentId: task.data.experiment._id } })
        log.i "Finish request for #{task._id} handed:\n#{JSON.stringify(res, null, 2)}"
    catch e
        log.e "Error while performing done request for #{task._id}: #{e.toString()}"

perform = (task) ->
    argsString = _.toPairs(task.data.args).map((arg) -> if arg[1]? then arg.join('=') else '').join(' ')
