add function to process the scan of directory and import the content.