[#3289] Fixed the use of the variable $captureTo instead of $append