Edit WriteLine method