Cleanup code
Check return value