support sync require calls
add some tests for error cases
initial command line script