dump function when debugging