Add logging interface and fixed "make dist"