improve error handling in project