Ignoring OS related file and a little bit of refactoring to render the code a little bit pretty
print message will only be done when the DEBUG_MODE is set to True.

Change the way bad folder were detected (sometimes they weren't)