Made zstore_import() thread-safe