fixed open - now returns an error instead of exiting
made changes to syscall