Added size limit to prevent logfiles from getting too big