Add assertions for main thread and fix sample.
Add a future into call for blocking bg loads.