fix non-working #/file route in javascript