Added open file check and updatd docs