cut length of process and added ability to print to an external file and stop screenshot using env var