debugging the file-delete functionality, moving logic into Helper class