check if file exists before deleting keys, and add debug output for every
delete operation
unit tests