I currently have a spring boot web application. The application writes to a file every time the web app is refreshed. Locally I am able to see the files in the root path directory. But when I upload my .jar file to cloud foundry how would I be able to obtain those files that are being written?

**Script snippet writing to file**

```
try{
Date date = new Date();
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH-mm-ss");
File file = new File(dateFormat.format(date) + "data.txt");
BufferedWriter out = new BufferedWriter(new FileWriter(file));
out.write("Some Data is being written");
out.close;
} 

```

I am able to find data.txt in my root folder. But How can I get those files after I package my application to a jar, and push it to cloud foundry.

**Cf push command**

```
 -cf push testapp -p target/webapp.jar

```