Added check if file exists before removing.