Fixed file functions use