debug mode & grain rename part2