Operations on file - logic