fix bug occurs during files protection

bug: file have been marked as protected when its full name contains
protected directory name
refactor Records

make class fields private and realize necessary getters and setters
refactor InputClass to Input