Reindent a line
Move a "big" duplicated expression into a named variable
Use the File constructor rather than File.separator; use file.getName() rather than its toString(); close "fout" even if "in" could not be