fixed validation for input params and files