Modifying code to work when files are not provided