example loop-session and fixed reading files