add log functions. interruption not working right yet