Added check for each parameter in random optimization script