I would move the require to the top of the file. It is better to load everything upfront for travis-build.