Use contextlib for prevent double loading