Removes else condition that was used for testing
Fixes directory deletion and logging