added some basic error handling to the frame-db