Fixing bug: it could not find any files in input directory