Added test for the remove_old_logs procedure
Fixed an error where the log messages appeared twice.
Fixed an error where the average uptime was not calculated properly.