Added semaphores and security to image importer