Merge: NullPointerException while exporting using task manager (#267)

Bug fix for bug #267
[UndeclaredThrowableException](https://docs.oracle.com/javase/7/docs/api/java/lang/reflect/UndeclaredThrowableException.html) extends RuntimeException. I think we don't this `else` branch.