Replaced deprecated method transform_datastream with transform_file