You don't say what's going wrong, so I'm not sure where the problem lies. But I attach a couple of xml question exports that you should be able to import and run. The first one just outputs 'hi', the second reads a single supplied file 'blah.txt' and writes to stdout all the lines backwards. If those don't work, please provide a detailed description of what goes wrong, plus a screenshot.
Note that your intention to have students read a file and write a new one is a bit problematic: such a program wouldn't generate any output so is hard to test. It's possible to write your own question type that first compiles and runs the student answer then compiles and runs your test code but it's a huge step up in complexity and certainly not recommended until you're familiar with the standard question types.
The usual way to set and test write-a-program questions is as in program contests: get students to read from standard input and write the processed output to standard output. You specify both the input and expected output in each test case, so can test with multiple datasets.
There are quite a lot of possibilities but if this is a newly installed CodeRunner using the default Jobe server, jobe2.cosc.canterbury.ac.nz, the most likely explanation is that the Moodle server is preventing HTTP requests to that server. A firewall configuration, perhaps? You probably need to talk to a sysadmin, who should be asked to check the installation procedure for coderunner (https://github.com/trampgeek/moodle-qtype_coderunner#installation).
Please note that this default server is only for initial testing. The CodeRunner installation documentation explains how to set up your own Jobe server for production use. Further documentation is at https://github.com/trampgeek/jobe#jobe