Improve file stream controller.