Added ability to write file, however still debugging. Right now in debug
mode it says the media is not mounted for writing.