Bash script using sed & awk

@ogra I have tried this multiple time, the issue persists. How do we debug this issue? Is there a way to read metadata of the packaged snap to compare if the package does have the stagePackages we included?