formatting and clear out the stderr