make sure that staging_task.log is created before staging setup completes

Change-Id: I1d87ab5bde041c75f2a14aa6c6b63469f2f46a51
break connection when file being tailed is deleted

Change-Id: I300be6ca91ffcf0604b654a8124ba57e91278851
simplify stream_handler for loop

Change-Id: Id3a76ba84c2151a54ca4dfa61db19d09df4c51e9
flush content before starting to tail a file if custom tail offset is given

Change-Id: Id0c7e9163b3bff5fc65443fb67f5206aa1ec9d89