I found a way to make it work.
The crontab I had used so far was the pi crontab (I new to this, so I assumed theres was only one).
Instead I edited the roo/sudo crontab so the code would run as such. That meant that the right permissions were in place
Works like a charm now