fix a bug that export requires global output file already exist