change heredoc eof marker
fix var name
stubs to check if a path exsists before adding to it