Modified add template to allow us to tell the user when an error has
occured