Check if test file exists before removing it