Preparing the input file