function lockSOD(){ // check if it is still needed - switched everything over to requestlock()

    case_data.locked=true
    lockedByMe = true
    var fs = require("fs");
    var buffer = new Buffer.from(JSON.stringify(case_data,null, "\t"));
    fs.writeFileSync(currentfile.toString(), buffer);
    deactivateReadOnly()
    saveSOD()

}
The user wants to lock the file so editing is possible