Cross Platform

Added good exception handling