fix file path when writing to hdfs