release lock in mapnik grid provider also, put mapnik check in try block