Revamped file stream lib now working with test cases.