Added logging of searches in new database table