Add folder action and bug fix