added ctail and improved some commands