Function version of HDP writer so we can get more debug output