introduce logging and improve dependency handling