Extended functionality of dictionary writer,
by giving some extra checks.