Revise screenshot function