Updated an error in the code

Updated an Error in the code, original by: Mod Davey.
Mistake was made (wireline) changed by Mod Mitchel to (writeline)