add methods to write to hdfs