added basic test input & output write functions