Move logging function call above screenshot process
merge