Test for handleFormatFiles