If you ever see this error it means you're trying to output a function which doesn't return a value.
For me I was playing around with fileDelete() and without looking at thedocs I assumed this would pass back a boolean to tell you if it was successfulor not.