Fixed reading input and added input files