added better logging. more checkpoints needed