fix broken print. #dir to $dir