improve error handling
export context