handle logrotates
close file descriptor when just seeking