Added write file operations