add try-catch around you not knowing how to spell encode / decode
added try-catch around invalid file names for whatever's in that directory