Cleaned up the code so it can be ran multiple times and won't overwrite, but instead
look to update, if possible.