Got rid of errors. Needed to check for existence before doing things