Added license and changed stream to printf to comply with lintcpp.