stop capture when there is less then 512k of free space available

Signed-off-by: Luka Perkov <luka.perkov@sartura.hr>