Added input file support