Add -w functionality