Why use text parameter instead of mode for Flask from_file?