added get file and write file callback