fix a small bug in main when creating the Writer Instance.