Updated paths and error handling