better error checking + notification