fixed writing error and overlooked command arg