The file will never be deleted.
$iif($read(timer.txt,$1,s) != $null,return $true,return $false)
.remove timer.txt

Return is called before the remove is executed. Although I think writing it to a file is a horrible way to do this, the correction would be:
var %result = $iif($read(timer.txt,$1,s), $true, $false)
.remove timer.txt
return %result