Added in conditional statements to ensure file/variables added only once