Rethrow exception and only log errors