fix some defects 

log_error() ?