Previously if the process was being run by sudo, this code block attempted to chown the created file to be owned by the user who had invoked sudo. This worked in the "normal" case where sudo was used to run a capture application as root, but if sudo is being used to run an application as another (non-root) user, then the chown would fail.
Previously if the process was being run by sudo, this code block attempted to chown the created file to be owned by the user who had invoked sudo. This worked in the "normal" case where sudo was used to run a capture application as root, but if sudo is being used to run an application as another (non-root) user, then the chown would fail.