Open input file before parsing it.