add excluding function to screenshot module and some improvements.