Clean up. Solved the log problem