The path to the file is duplicated below; let's extract that to a variable (and use File.join).