use dirbad rather than printf