Added functionality to write number to disk