Fixed typo in dirtail.c and added new code cmd