Remove __del__ to symplify gc, add error logging