Switched some variables around to make sure a file path is defined
before dumping content to it