fixing bootstrap machine task, writing errors to database in case of failure