Added try{} block to fix exception under perl 5.18.2

Needs further investigation...