Test before unzipping not after
Use unicodecode instead of unaccent postgresql because this extension is not in postgresql 8.4