wrap wakelock release with try catch