handle response correctly

Fix Error: Can't set headers after they are sent.
when an ENOENT error thrown by render