just moved the open() to avoid jslint error