         createCache: (convertedFilename, conversionParams, callback) =>
                 filepath = @_getCacheName conversionParams
                 input = fs.createReadStream convertedFilename
+                input.on "error", (err) =>
+                        console.log "Read stream error: #{err}"
                 output = fs.createWriteStream filepath
                 input.pipe output
                 input.on "end", =>

                                response.set "location", location
                                response.send "Go to #{location}", 302
                                return
                        fs.stat filename, (statErr, stats) =>
                                if statErr
                                        response.send "Failed to read original file name.", 500
                                        return

                                tempname = temp.path {suffix: ".#{suffix}"}
                                converter.convert filename, @bitrate, tempname, (err) =>
                                        @_conversionDone err, cacheInstance, tempname, response


exports.FileConverterView = class FileConverterView

                return hash.digest("hex")

        _createFilename: (conversionParams) =>
                digest = @getDigest conversionParams
                filename = "#{digest}.#{conversionParams.suffix}"
                return filename

