fix bug: check read status in CGI