More debugging logic