Fixed Makefile
Readded write method