Log import history in database