added logging and completed setup script