add file operation\nfix bugs