Don't overwrite previous set options. Just set al options direct in the options.
If error while adding a layer, catch and log. Don't stop adding layers.