Error handling added to start and stop slave