check existence of file before exporting instances