Added file validation for PDF and Markdown