Fix logger and main