changed use of os.unlink in favour of os.remove