Remove leading and trailing line from pre env