fixed writing error and overlooked command argument