add unit tests for file-manipulation funcs