You do not need to see 404 in response page. It's in the headers. You can see your response headers with chrome developer toolbar (or firebug on firefox) in network tab.
This header should do the trick. I suggest putting an exit just after setting the 404 header and echoing message. This will make sure you do not output anything after setting header & printing not found message.