exit program after last file