decode! is not happy with File.Stream.t as input. Try File.read! or more generally, try reading the docs.
File.Stream.t