Encoding

Added encoding argument to the ini importer and fixed crash handling if things go wrong