updated open_file, wrote delete and removeall