add addFile method, closes #2