Got it! It's just plain stupidity - when importing the dat file, I made a simple import, not an import with projection data! So of course it didn't work. Let's say that a message telling that there is no projection data when trying to export template would be helpful
