moved this to a specific file which can be required separately if you're interested in debug output