If the debug.log file doesn´t exist it's created to avoid an error passing to the truncate function a missing file that raises an error.