more bug fixes, new debug source file