Update main.js

bad file pointer