parser.py: added input file handling