changed debug messages and added test file