implemented filewithlocal and a test