Bug fixes
Added file write operation.