add handling of --pidfile argument