Breaking out the debug stuff into its own file