Misc improvements for -debug logging.

Fix currently edited file source code printing.

Add some info about resolving imported packages.