Fixed Bug, writing to files now works.