Fix bug in processFile()