Added recordOptions
Fix minor bugs