modify some stuff and add calls to standard log package's functions