Tuning pieces_check script