Thank you Martin. I've added this now. I'll monitor the script and update you.
Before posting, please read how to report bug or request support effectively.
Bug reports without an attached log file are usually useless.
$session.Timeout = New-TimeSpan -Seconds 120
Session.Timeoutto the current script. Can you please help ?