Added check for test in file.(bool logic)