open histfile
cleanup
open log