Add health check and debug printing