Added return an error code.