fix switched argument bug in processFile function