filled in implementation for file handling
added debug log macro