check if <name>.js exists, it must be `cortex.main`; fixes #12