Added file support and postMessages