I thought of doing something similar as well, but in that case I will still have to repeat all lines of code following try in except as well which I thought was a bad practice to follow in general. But still thanks for your insight.