using capture_merge instead of 2>&1 redirection