reload page if closing the sitepanel
clean up debug output