update logging to create parent directory if it does not exist