added debugging, logging and temporary folder