Fixed some error issues, primarily with handling exceptions when directories are not found