added error checking to new message route