Fix file descriptor leak by always closing the created TikaInputStream