unlink should happen within catch as well