Error checks added to setup script