improved output of checkAmbiguity, added tests
adding tests for checkAmbiguity
make file behavior more consistent across functions
update doc