use response.write
set content_type for /ok
improve error message