update the needle flag when inserting new files