Updated for available functions to write to file