[proflog] Fix double dumping and compilation warning