re-add debugging
add generic, logging system() wrapper functions to lib