added 4 sec sleep to allow connections to close