code for running the import in the background

Change-Id: I36577c77fa65dd6dd0a7bfc2032c44957d37c9d5