including conditions to check if the video will be overwritten
fixing identation
retrieving flashvars and refactored the filename to be recorded