Error 201 covered, extra error checking added.