Check file exists before trying to remove it.