Safe calculating of total size (catching possible exceptions from getsiz...

...e)