added support for multiple files and directories as input