adding error handling and static assets