Update main.js

Can now deal with query params in file names