Make debug stuff optional