I am getting
open failed: EACCES (Permission denied)
EACCES (Permission denied)
on the line OutputStream myOutput = new FileOutputStream
OutputStream myOutput = new FileOutputStream
It turned out, it was a stupid mistake since I had my phone still connected to the desktop PC and didn't realize this.
So I had to turn off the USB connection and everything worked fine.