code refactoring
updated fileops