fixed proteced functions
fixed bug, where testfiles were overwritte