I think we should be more specific than just grepping for "1024" - what else does the line contain?  Likewise below, can be more specific in our sed expression.