Wrap the file addition in an $apply