return error on invalid sections in input