Added error wrapping-up to prevent failures