sort Input for fileName and reverse completed