changed fileobj to outputFile