move index to lib
better organization of tests
fix failOnError to only fail when lint found
add helper log statement