Fixed bug in loading file - still not sure it will work

Unfortunately i need to keep committing because i have not yet set up a
suitable test environment