Adding filetype validation.