Taking out some console logs and providing for a case where the file does not yet exist