close .cormo_histroy file descriptor correctly

(for cormo console via socket)