cleanup wakelock handling
cleanup wakelock handling
wakelock error handling
updated version