Declaring scoped variables for output and file ext