checkDependency at beginning to prevent silly crash

Workaround for issue #197