add a function to dump the output for desired layers