also added missing file.encoding argument to the console call