error handling for folded start-up included (copied from Alexander Vorobiev).