Added whitelist to check file extensions