better handling of input files paths