Use pre.js instead of post.js to ensure JS functions are executed before run()