Added listener to scan button