Added catches for RuntimeExceptions. Updated version.