fix reading past eof when finding runs
add encrypt mode