added an error handling and a debug output.
added a test pattern to confirm that rebuilding of the database of a header file works.
fixed a bug that rebuilding of a database of a header file fails.