When working with certain tools, it is essential to utilize absolute file paths. This approach ensures that the directories you specify begin with the root user directory, specifically /home/pi. Avoid using shorthand notations like ~ or ./ to prevent any potential issues.
Source Link