written tests; bugs with system and temp files