add windows compatity and dumping option