Added possibility to print terrain to file