Adding parameter Validation and logging error in service