Rewrite load_file to use IO instead of StringIO. Way faster.