Added error message is code is a duplicate