Added error log and rethrow.