added error handling to collection folder