added logging option and reverse proxy option