changing correlation writing to write single files