@Justwin
You have the solution in post number 2. The whole thing is simple and safe.