More working code. Only gets 1 file each restart