main metho, logger