small fixes, bit of logging and trivial save_piece