Convert to specified filetype, whitelist extensions