added timeout and additional logging