Fix file handler for current api design