Add screenshot creator
Fix problem in while loop, minor changes