temp fix for output writing