update tool that writes namelists, now it works correctly