Implemented param checking, and allowing multiple files