fixed  file operations