added tail functionnality (needs java7)