ok so i got this code for a keycard system. if you put a certain floppy disk in a disk drive it activates a redstone signal. the way this works is there is a password, then there is a file on the disk called access. now if the password matches the password written in the access file on the disk the door opens. if it doesent match it does nothing. now what i want to happen is if the pass doesent match it activates a different redstone signal at a different side of the computer. at the top of the code you can see password in qoutes. the word written in this must match the word written in "access" on the floppy for the door to open. please could someone tell me how to make it so if it doesent match it sends out a redstone signal at a configurable side for a configurable time.

password = "password"
debug_char = "0"
term.clear()
function mainLoop()
while(true) do
event, driveSide = os.pullEventRaw()
if(event=="disk" and driveSide) then
path = disk.getMountPath(driveSide)
if(path) then
path = path.."/access"
file = fs.exists(path) and io.open(path, "r") or nil
end
disk.eject(driveSide)
if(file and file:read()==password) then
rs.setOutput("left", true)
sleep(3)
rs.setOutput("left", false)
end
if(file) then file:close() file = nil end
elseif(debug_char and event=="char" and driveSide==debug_char) then return("break") end
end
end
rs.setOutput("left", false)
sfile = io.open("/startup", "w")
sfile:write('shell.run("keycard")')
sfile:close()
repeat
ok, err, val = pcall(mainLoop)
if(not ok and err) then
if(err=="Terminated") then print ("Access denied.")
else
print(err)
end
end
until(ok and err=="break")

Thanks -Cheeky