All files you create in Pythonista's UI have an (invisible) .py extension, so the "log.txt" file you created is actually "log.txt.py", which is why your script couldn't read it. At the moment, you could either change the file name to "log.txt.py" in your script (probably the easiest), or write the txt file programmatically somehow (various ways to do that, but you couldn't see the file in Pythonista's library because it only shows .py files).