Working test generator, fixed bug in file input