Update file checking JS to be correct