Update screenshot.js

added setTimeout