added debug, saved dependencies, fixed singleton resource