To avoid the if statement in a file copy loop I'm doing only one fread(), check if it's a test file and then enter the while loop.