Improve names
Fixed file functions use.