Remove logs when necessary