Added file removal routine and write mode. Still very buggy. Write mode
needs addressing