fixed reading duration (by clearing output)