Make the file output actually work