Make sure opts is sanitized before creating worker