added pidfile, hup handling, truncate option