Fix name in tmp dir and deleting folders at the end