Added smart mime type checking for rendering files