Updated, should be working. File will output to current diretory