Updated Changes to Tikpy with working write function