added arguments and writes outputfilename to stdout