updated logging and allowed 201 status code