Read input files using new functions