changes file input to multiple and fixes file count