Fixed deprecation warnings
Eliminated warning for catch clause