maybe add defaults $targetLevel = 0, $flush = true