Changes to add a file stream