code to write features: code/featureWriter.py