Fix program invocation order.

This fix ensures that the importer sink gets registered first before the source
starts producing events, which could result in chunks arriving but the importer
crashing.
Fix bug in address masking.
Generate a built-in schema if none given.