Add task exists interop.
Fix several issues with import calculation.
Add more debug info.