Add debug param to make optional
Fix dom example after debug param addition