Added File Writing Capabilities. Code is still rough