Changed method signatures to throw exceptions back to parent. How it should be done.
Test writing a file