Fixed a bug with the mode switch
Starting fleshing out single file mode