Added more logging and escape to close
Added a frames counter