logging and signal handling
logging improvements