Add status argument in webpage open callback and more error handling