adadpted the compilation, testing and error reading tools to be more portable