Handle error
Clean up variables