made foliacat work with one input file too