free file handles at the end. also changed elevation threshold to 800m for other continents than sam