Change 'd' option to 'w' for better backward compatibility