use readlines() instead of file() to avoid open connection warnings