Added check if AP already exists error checking