[BUGFIX] Fix file handling in import/export module