added check for req.files