Put in delay before tail using new sleep function