add apache license header
introduce central logger
implement stop for graceful shutdown