Error: stream type not specified and couldn't be determined by file extension