Adds logging support and removes a bug in the build system