removing debug log
freebsd: replacing until instruction with the more portable while