Added error handling in jwrite