Logic of the input file reading has been implemented