Close files
Return error from readLine; remove slog usage