Updated moof

Added write method for moof