corrected inputfile generation